<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns:ui="http://java.sun.com/jsf/facelets"
      template="./layout/newTemplate.xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"  
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns="http://www.w3.org/1999/xhtml">
    <h:head>
        <title>TODO supply a title</title>
        <meta name="viewport" content="width=device-width"/>
    </h:head>
    <h:body>
        <div>TODO write content</div>
        <h:form enctype="multipart/form-data" id="frm">

            <p:fileUpload fileUploadListener="#{fileUploadController2.handleFileUpload}"
                          mode="advanced"
                          update="messages"
                          label="Choose a file"
                          sizeLimit="1048576"
                          allowTypes="/(\.|\/)(gif|jpe?g|png)$/"
                          invalidSizeMessage="The maximum file size allowed is 1 Megabyte !"
                          invalidFileMessage="You are allowed to upload only images !"
                          />
            <h:inputFile value="#{fileUploadController2.file1}"/>
            <h:commandButton action="#{fileUploadController2.upload()}" value="Upload"/>  
            <p:growl id="messages" showDetail="true" sticky="true"/>
            <p:inputTextarea value="#{fileUploadController2.logEventos}" cols="80" rows="7"/>

            
        </h:form>
    </h:body>
</html>
